package com.zhuxi.service.impl;

import com.zhuxi.service.HelloService;
import com.zhuxi.util.RequestIpHolder;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

@Service
public class HelloServiceImpl implements HelloService {
    @Override
    public String sayHello(String name) {
        System.out.println("请求IP为："+ RpcContext.getContext().getAttachments().get(RequestIpHolder.RQUEST_IP));
        return "hello:" + name;
    }
}
